#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
using namespace std;

int main()
{
	int a = -5;
	cout << a % 3 << endl;

	int b = (a % 3 + 3) % 3;
	cout << b << endl;
	return 0;
}